import {request} from "./request";
//登录
export function login(ruleForm) {
    return request({
        url:'/user/login',
        method:'post',
        data:ruleForm
    })
}
//注册
export function register(UserForm) {
    return request({
        url:'/user/register',
        method:'post',
        data:UserForm
    })
}
//退出
export function logout() {
    return request({
        url:'/user/logout',
        method:'get'
    })
}

//查询所有用户
export function findallUser(current) {
    return request({
        url:'/user/findall/'+current+'/6',
        method:'get'
    })
}

//模糊查询用户
export function queryUserFuzzy(user,current){
    return request({
        url:'/user/queryFuzzy/'+current+'/6',
        method:'post',
        data : user,
    })
}
//删除用户
export function deleteuser(uid){
    return request({
        url:'/user/delete/'+uid,
        method:'delete',
    })
}
//保存用户
export function saveuser(user){
    return request({
        url:'/user/saveuser',
        method:'post',
        data : user,
    })
}
//id查询用户
export function finduserbyid(uid){
    return request({
        url:'/user/findByid/'+uid,
        method:'get',
    })
}
//修改用户
export function updateuser(user){
    return request({
        url:'/user/updateUser',
        method:'put',
        data: user,
    })
}
//查询学院类别
export function querycategory() {
    return request({
        url:'/category/list',
        method:'get'
    })
}
//根据院系查询名片信息
export function queryvcardbycid(cid,current,size) {
    return request({
        url:'/ecard/findall/'+cid+'/'+current+'/'+size,
        method:'get'
    })
}
//删除名片
export function deleteCard(eid) {
    return request({
        url:'/ecard/deleteEcard/'+eid,
        method:'delete'
    })
}
//查询名片详情信息
export function queryecardDetail(eid) {
    return request({
        url:'/ecard/queryDetail/'+eid,
        method:'get'
    })
}
//查询未被审核名片名片
export function queryunauditcard(current,size) {
    return request({
        url:'/ecard/findbyAudit/'+current+'/'+size,
        method:'get'
    })
}
//模糊查询
export function queryFuzzyecards(ecardForms,current,size) {
    return request({
        url:'/ecard/queryFuzzy/'+current+'/'+size,
        method:'post',
        data : ecardForms,
    })
}

//我的名片
export function queryMycard(uid) {
    return request({
        url:'/ecard/queryMycard/'+uid,
        method:'get'
    })
}
//修改名片
export function updateMycard(ecardDetails) {
    return request({
        url:'/ecard/updateMycard',
        method:'put',
        data:ecardDetails
    })
}
//教师修改名片
export function editMycard(ecardDetails) {
    return request({
        url:'/ecard/editMycard',
        method:'put',
        data:ecardDetails
    })
}
//我的预选单
export function queryMyprimary(uid) {
    return request({
        url:'/primaryList/list/'+uid,
        method:'get'
    })
}
//加入预选单
export function addMyprimary(uid,eid) {
    return request({
        url:'/primaryList/add/'+uid+'/'+eid,
        method:'get'
    })
}
//删除预选单
export function delMyprimary(uid,eid) {
    return request({
        url:'/primaryList/delete/'+uid+'/'+eid,
        method:'delete'
    })
}
